package com.crm.controller;



import com.crm.constant.dto.BaseFxResponse;
import com.crm.entity.CrmEmployee;
import com.crm.model.bo.EmpProjectApplyBo;
import com.crm.model.bo.EmployeePageBo;
import com.crm.model.bo.EmployeeProjectPageBo;
import com.crm.model.bo.ProjectBo;
import com.crm.model.dto.BasePageResult;
import com.crm.model.vo.EmployeeProjectVo;
import com.crm.service.ICrmEmployeeProjectService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author CRM_SYSTEM
 * @since 2022-03-30
 */
@RestController
@RequestMapping("/crm-employee-project")
public class CrmEmployeeProjectController {

    @Autowired
    private ICrmEmployeeProjectService employeeProjectService;

    @ApiOperation("用户服务状态变更")
    @RequestMapping(value = "/save/update",method = RequestMethod.POST)
    public BaseFxResponse<Long> saveUpdateEmpPro(@RequestBody @Validated EmpProjectApplyBo empProjectApplyBo){
        return employeeProjectService.saveUpdateEmpPro(empProjectApplyBo);
    }

    @ApiOperation("用户活动列表")
    @RequestMapping(value = "/query/page",method = RequestMethod.POST)
    public BaseFxResponse<BasePageResult<EmployeeProjectVo>> queryPage(@RequestBody @Validated EmployeeProjectPageBo page){
        return  employeeProjectService.queryPage(page);
    }
}

